{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Progress Reporting"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for ( int i = 0 ; i<100; i++) {\n",
    "  beakerx.showProgressUpdate(\"\", i)\n",
    "  sleep(100)\n",
    "}\n",
    "\"finished\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def messages = [\"starting\",\n",
    "                \"started\",\n",
    "                \"begin\",\n",
    "                \"middle\",\n",
    "                \"ending\"];\n",
    "\n",
    "for ( int i = 0 ; i<5; i++) {\n",
    "  beakerx.showProgressUpdate(messages[i], i*20)\n",
    "  sleep(1000)\n",
    "}\n",
    "sleep(1000)\n",
    "\"finished\""
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "beakerx_kernel_parameters": {},
  "kernelspec": {
   "display_name": "Groovy",
   "language": "groovy",
   "name": "groovy"
  },
  "language_info": {
   "codemirror_mode": "groovy",
   "file_extension": ".groovy",
   "mimetype": "",
   "name": "Groovy",
   "nbconverter_exporter": "",
   "version": "2.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
